package com.haixiaoke.service.impl;

import java.util.List;
import com.haixiaoke.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haixiaoke.mapper.LockOfflineLogMapper;
import com.haixiaoke.domain.LockOfflineLog;
import com.haixiaoke.service.ILockOfflineLogService;

/**
 * 智能锁离线记录Service业务层处理
 * 
 * @author qixi
 * @date 2023-05-29
 */
@Service
public class LockOfflineLogServiceImpl implements ILockOfflineLogService {
    @Autowired
    private LockOfflineLogMapper lockOfflineLogMapper;

    /**
     * 查询智能锁离线记录
     * 
     * @param id 智能锁离线记录主键
     * @return 智能锁离线记录
     */
    @Override
    public LockOfflineLog selectLockOfflineLogById(Long id) {
        return lockOfflineLogMapper.selectLockOfflineLogById(id);
    }

    /**
     * 查询智能锁离线记录列表
     * 
     * @param lockOfflineLog 智能锁离线记录
     * @return 智能锁离线记录
     */
    @Override
    public List<LockOfflineLog> selectLockOfflineLogList(LockOfflineLog lockOfflineLog) {
        return lockOfflineLogMapper.selectLockOfflineLogList(lockOfflineLog);
    }

    /**
     * 新增智能锁离线记录
     * 
     * @param lockOfflineLog 智能锁离线记录
     * @return 结果
     */
    @Override
    public int insertLockOfflineLog(LockOfflineLog lockOfflineLog) {
        lockOfflineLog.setCreateTime(DateUtils.getNowDate());
        return lockOfflineLogMapper.insertLockOfflineLog(lockOfflineLog);
    }

    /**
     * 修改智能锁离线记录
     * 
     * @param lockOfflineLog 智能锁离线记录
     * @return 结果
     */
    @Override
    public int updateLockOfflineLog(LockOfflineLog lockOfflineLog) {
        return lockOfflineLogMapper.updateLockOfflineLog(lockOfflineLog);
    }

    /**
     * 批量删除智能锁离线记录
     * 
     * @param ids 需要删除的智能锁离线记录主键
     * @return 结果
     */
    @Override
    public int deleteLockOfflineLogByIds(Long[] ids) {
        return lockOfflineLogMapper.deleteLockOfflineLogByIds(ids);
    }

    /**
     * 删除智能锁离线记录信息
     * 
     * @param id 智能锁离线记录主键
     * @return 结果
     */
    @Override
    public int deleteLockOfflineLogById(Long id) {
        return lockOfflineLogMapper.deleteLockOfflineLogById(id);
    }
}
